<form action="{:url('open',['action_id'=>$form_action['id']])}" method="post">
    <if condition="$hidden">
        <foreach name="hidden" key="key" item="value">
        <input type="hidden" name="{$key}" value="{$value}">
        </foreach>
    </if>
    <foreach name="fields" item="field">
    <if condition="$field['readable']">
        <if condition="isset($fields_widget[$field['name']])">
        <div>
            <label for="{$field.name}">{$field.title}</label>
            {$fields_widget[$field["name"]]}
        </div>
        <else/>
        <div>
            <label for="{$field.name}">{$field.title}</label>
            <input type="text" name="{$field.name}" id="{$field.name}" value="{$item[$field['name']]|default=''}" <?php if(!$field['writable']) echo 'readonly';?> <?php if($field['required']) echo 'required';?>>
        </div>
        </if>
    </if>
    </foreach>
    <button type="submit">{$form_action.title}</button>
</form>
